<?php

class table_technic extends table
{
	public $id = 0;
	public $category_id = 0;
	public $title = '';
	public $description = '';
	public $summary = '';
	public $keyword = '';
	public $demo = '';
	public $hits = 0;
	public $create_by_id = 0;
	public $create_time = 0;

	public function __construct()
	{
		parent::__construct( 'bone_technic', 'id');
	}

	public function hit()
	{
		$db = bone::get_db();
		$db->execute('UPDATE `'.$this->table_name.'` SET `hits`=`hits`+1 WHERE `'.$this->table_key.'` = \''.$this->{$this->table_key}.'\'');
	}
}